home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / cpp_libs / rwvector.lha / RWVector2.1 / src / utility.cc < prev    next >
C/C++ Source or Header  |  1989-08-18  |  1KB  |  60 lines

  1. /*
  2.  *    Utilities used by the Vector routines
  3.  *
  4.  *    Copyright (C) 1988, 1989.
  5.  *
  6.  *    Dr. Thomas Keffer
  7.  *    Rogue Wave Associates
  8.  *    P.O. Box 85341
  9.  *    Seattle WA 98145-1341
  10.  *
  11.  *    Permission to use, copy, modify, and distribute this
  12.  *    software and its documentation for any purpose and
  13.  *    without fee is hereby granted, provided that the
  14.  *    above copyright notice appear in all copies and that
  15.  *    both that copyright notice and this permission notice
  16.  *    appear in supporting documentation.
  17.  *    
  18.  *    This software is provided "as is" without any
  19.  *    expressed or implied warranty.
  20.  *
  21.  *
  22.  *    @(#)utility.cc    2.1    8/18/89
  23.  */
  24.  
  25. #include <stdio.h>
  26. #include "rw/vdefs.h"
  27. #ifdef __GNUG__
  28. #include <std.h>
  29. #else
  30. #include <stdlib.h>
  31. #endif
  32.  
  33. void
  34. RWerror(Severity gravity)
  35. {
  36.   switch (gravity) {
  37.   case WARNING:
  38.     fputs("** Processing continues.\n", stderr);
  39.     break;
  40.   case DEFAULT:
  41.   case FATAL:
  42.   default:
  43.     fputs("** Processing terminated.\n", stderr);
  44.     exit(gravity);
  45.   }
  46. }
  47.  
  48. void
  49. RWnote(const char* routine, const char* comment)
  50. {
  51.   fputs("\n",stderr);
  52.   fputs("** ",stderr);
  53.   fputs(routine,stderr);
  54.   fputs("\n",stderr);
  55.  
  56.   fputs("** ", stderr);
  57.   fputs(comment, stderr);
  58.   fputs("\n", stderr);
  59. }
  60.